@istest
private class emailAttachmentReassignerTester {
		static testmethod void attachmentTester() {
			Attachment a = new Attachment();
			a.name = 'test attachment';
			a.body = blob.valueof('attachment body');
			
			Case c = new Case();
			insert c;
			
			EmailMessage e = new EmailMessage();
			e.ParentId = c.Id;
			 
			insert e;
			if(e != null){
				a.parentid = e.id;
				
				insert a;	
				
				delete a;
			}
		}	
}